<template>
  <MrCustom bg-color="bg-gradual-blue " is-back>
    <template #backText>
      返回
    </template>
  </MrCustom>
  <uni-card v-if="notice">
    {{ notice.content }}
  </uni-card>
</template>

<script setup lang="ts">

import {onLoad} from "@dcloudio/uni-app";
import {ref} from "vue";
import api from "@/api";
import MrCustom from "@/components/common/MrCustom.vue";


const notice = ref()
onLoad((option) => {
  let params = JSON.parse(decodeURIComponent(option.params))
  getNotice(params.id)
  // console.log(JSON.parse(decodeURIComponent(option.params)))
  // schedule.value = JSON.parse(decodeURIComponent(option.params)).schedule
  // patientInfo.value = JSON.parse(decodeURIComponent(option.params)).patientInfo
  // console.log(schedule.value)
  // console.log(patientInfo.value)
})

const getNotice = (id: any) => {
  api.notice.queryById({
    id: id,
  }).then(res => {
    if (res && res.data.code === 0) {
      notice.value = res.data.data
    }
  })
}
</script>

<style scoped>

</style>